 <div class="main-wrap">

        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="index.html">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">分销用户管理</span></div>
        </div>
        <div class="search-wrap">
            <div class="search-content">
                <form action="" method="get">
                    <table class="search-tab">
                        <tr>
                           
                            <th width="70">用户名:</th>
                            <td><input class="common-text" placeholder="关键字" name="keywords" value="{$keyword}" id="" type="text"></td>
                            <td><input class="btn btn-primary btn2" name="sub" value="查询" type="submit"></td>
							<td><a class="btn btn-primary btn2" href="{:U('Daili/index?yingyee=1')}">所有余额为0的用户</a></td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
        <div class="result-wrap">
            <form name="myform" id="myform" method="post">
                
                <div class="result-content">
                    <table class="result-tab" width="100%">
                        <tr>
                           
                            <th>用户名</th>
                            <th>创建时间</th>
							
							<th>上级推广人</th>
							
                            <th>营业额</th>
							<TH>余额</TH>
							<th>提现明细</th>
                            <th>操作</th>
                        </tr>
                       <foreach name="re" item="v">
                        <tr>
						   
						
                            <td>{$v.username}</td>
                            <td>{$v.regtime|date="Y-m-d H:i:s",###}</td>
							
							
							
							<td>{$v.upname}</td>
							
							<td>{$v.yingyee}元 | <a href="{:U('Daili/yingyee',array('id'=>$v['id']))}">营业额明细</a></td>
							<td>{$v.money}元</td>
							<td>
							  <a href="{:U('Daili/tixian',array('id'=>$v['id']))}">查看明细</a>
							</td>
							<td>
							  <a onclick="del({$v.id})" style="cursor:pointer;">删除</a>
							
							</td>
                        </tr>
					   </foreach>	
                    </table>
                    <div class="list-page"> {$page}</div>
                </div>
            </form>
        </div>
    </div>
	<script>
	
	   function del(i){
	   
	    if(confirm('您确定删除此用户吗？')){
	   
	     $.post('{:U("Daili/del")}',{"id":i},function(re){
		    
			if(re==1){
			
			  alert('删除成功');
			  location.reload();
			}else{
			
			  alert('删除失败');
			
			}
		 
		 
		 })
	    }
	   }
	
	</script>
	
	
	
